﻿using Stimulus360.Models.Data;

namespace Stimulus360.Repositories.Interfaces
{
    /// <summary>
    ///     This class is used for CRUD operations for the User Profile entity
    /// </summary>
    public interface IUserRepository
    {
        /// <summary>
        ///     Method to retrieve the user entity for the given user name
        /// </summary>
        /// <param name="userName">
        ///     Username for which the entity is to be retrieved
        /// </param>
        /// <returns>
        ///     User entity for the given name
        /// </returns>
        UserProfile FindUserByName(string userName);

        /// <summary>
        ///     Method to create a new user
        /// </summary>
        /// <param name="user">
        ///     User to be created
        /// </param>
        void CreateUser(UserProfile user);

        /// <summary>
        ///     Method to update an edited user to the database
        /// </summary>
        /// <param name="user">
        ///     User to be Updated
        /// </param>
        void UpdateUser(UserProfile user);

        /// <summary>
        ///     Method to submit all tracked changes to the DB
        /// </summary>
        void UpdateUser();
    }
}
